<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head lang="en">
    <meta charset="UTF-8">
    <title>试题管理</title>
    <meta name="keywords" content="">
</head>
<link rel="shortcut icon" href="../resources/images/favicon.ico"/>
<link href="../resources/bootstrap/css/bootstrap-huan.css" rel="stylesheet">
<link href="../resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="../resources/css/style.css" rel="stylesheet">
<link href="../resources/css/exam.css" rel="stylesheet">
<link href="../resources/chart/morris.css" rel="stylesheet">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="../resources/font-awesome/css/font-awesome.min.css"/>
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-theme.css"/>
<script type="text/javascript" href=""></script>
<script type="text/javascript" href="../resources/bootstrap/js/bootstrap.js"></script>
<link rel="stylesheet" href="../resources/css/laypage.css"/>
<link rel="stylesheet" href="../resources/layer/skin/default/layer.css"/>
<script type="text/javascript" src="../resources/laypage/laypage.js"></script>
<script type="text/javascript" src="../resources/layer/layer.js"></script>
<script type="text/javascript" src="../resources/js/jquery/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="../resources/vue/vue.js"></script>
<style>
    input.add-ques-amount, input.add-ques-score {
        width: 50px;
        margin-right: 0;
    }

</style>
<body>
<header>
    <div class="container">
        <div class="row">
            <div class="col-xs-5">
                <div class="logo">
                    <h1><span>在线考试系统</span></h1>
                </div>
            </div>
        </div>
    </div>
    <div class="navbar bs-docs-nav" role="banner">
        <div class="container">
            <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
                <ul class="nav navbar-nav">
                    <li>
                        <a href=""><i class=""></i>网站首页</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>试题管理</a>
                    </li>

                    <li>
                        <a href=""><i class=""></i>试卷管理</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>会员管理</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>题库管理</a>
                    </li>
                    <li>
                        <a href=""><i class=""></i>网站设置</a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</header>
<!-- Navigation bar starts -->

<div class="navbar bs-docs-nav" role="banner">
    <div class="container">
        <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
        </nav>
    </div>
</div>

<!-- Navigation bar ends -->

<!-- Slider starts -->

<div id="app" >
    <!-- Slider (Flex Slider) -->

    <!--左导航guohanyu-->
    <div id="left-nav"  style="position: absolute;left: 20px;top: 200px; width: 300px;">
        <ul class="nav default-sidenav">

            <li class="active">
                <a> <i class="fa fa-list-ul"></i> 试卷管理 </a>
            </li>
            <li>
                <a href="exampaper-add.html"> <i class="fa fa-list-ul"></i>新增试卷</a>
            </li>
        </ul>
    </div>

    <div class="container"  style="min-height:500px;">

        <div class="row">
            <div class="col-xs-2" id="left-menu">
            </div>
            <div class="col-xs-10" id="right-content">
                <div class="page-header">
                    <h1><i class="fa fa-file-text-o"></i> 创建新试卷 </h1>
                </div>
                <div class="page-content">
                    <form id="form-exampaper-add">
                        <div class="form-line add-update-exampapername">
                            <span class="form-label"><span class="warning-label">*</span>试卷名称：</span>
                            <input type="text" class="df-input-narrow" name="examPaperName">
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line add-update-exampaper-creat-type">
                            <span class="form-label"><span class="warning-label">*</span>组卷方式：</span>
                            <select class="df-input-narrow" name="examPaperType">
                                <option value="2">自动组卷</option>

                            </select>
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line add-update-pass-point">
                            <span class="form-label"><span class="warning-label">*</span>及格分数：</span>
                            <input type="text" class="df-input-narrow" name="passPoint">
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line add-update-duration">
                            <span class="form-label"><span class="warning-label">*</span>时长（分钟）：</span>
                            <input type="text" class="df-input-narrow" name="duration">
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line add-update-types" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>题型：</span>
                            <fieldset>
                                <legend>
                                    选择题型分布
                                </legend>
										<span class="add-ques-type">
											<label>单选题</label>
											<input type="hidden" class="ques-id" value="1">
											<input type="text" class="df-input-narrow add-ques-amount" name="questionCount">
											<span>道</span>
											<label>每道题</label>
											<input type="text" class="df-input-narrow add-ques-score" name="questionPoint">
											<span>分</span>
										</span>
                                <br>
                            </fieldset>
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line add-total-point">
                            <span class="form-label"><span class="warning-label">*</span>总分：</span>
                            <input id="total-point" type="text" class="df-input-narrow" name="totalPoint">
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line add-update-exampaper-scope" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>知识分类：</span>
                            <fieldset>
                                <legend>
                                    知识分类范围
                                </legend>
                                <div>
                                    <div class="clearfix">
                                        <div id="aq-course1" style="padding:0px;float:left; width:48%;">
                                            <select id="field" class="df-input-narrow" size="4"
                                                    style="width:100%;" name="field">
                                                    <option v-for="(item,index) in fieldListresult" v-bind:value="item.">
                                                     {{index+1}}&nbsp;{{item.fieldId}}
                                                    </option>
                                            </select>
                                        </div>
                                        <div id="aq-course2" style="padding:0px; float:right;width:48%;">
                                            <select id="point-from-select" class="df-input-narrow" size="4"
                                                    style="width:100%;">
                                                <option v-for="(item,index) in fieldListresult" v-bind:value="item.pointListresult">
                                                    {{index+1}}&nbsp;{{item.pointId}}
                                                </option>
                                            </select>
                                        </div>
                                    </div>

                                    <div style="text-align:center;margin:10px 0;">
                                        <button id="add-point-btn" class="btn btn-primary btn-xs">选择知识分类</button>
                                        <button id="del-point-btn" class="btn btn-danger btn-xs">删除知识分类</button>
                                        <button id="remove-all-point-btn" class="btn btn-warning btn-xs">清除列表</button>
                                    </div>
                                    <div id="kn-selected"
                                         style="padding-left:0px;text-align:center;margin-bottom:20px;">
                                        <select id="point-to-select" class="df-input-narrow" size="4"
                                                style="width:80%;">
                                        </select>

                                        <p style="font-size:12px;color:#AAA;">您可以从上面选择4个知识分类</p>
                                    </div>
                                </div>
                            </fieldset>
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line">
                            <input value="下一步" type="submit" class="df-submit btn btn-info">
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

<footer>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="copy">
                    <p>
                        ExamStack Copyright © <a href="http://www.examstack.com/" target="_blank">ExamStack</a> - <a
                            href="." target="_blank">主页</a> | <a href="http://www.examstack.com/"
                                                                 target="_blank">关于我们</a> | <a
                            href="http://www.examstack.com/" target="_blank">FAQ</a> | <a
                            href="http://www.examstack.com/" target="_blank">联系我们</a>
                    </p>
                </div>
            </div>
        </div>

    </div>

</footer>

<!-- Slider Ends -->


</body>
</html>
<script type="text/javascript">
    Vue.comment;
    //vue使用
    var app = new Vue({
        el: "#app",
        data: {
            result: [],
            fieldListresult: [],
            pointListresult: []
        }
    });

    //$(function () {
        getAllField();
        getPointByField();


        //父类下拉框
        $("#field").change(function () {
            getPointByField();
        })
    //})

    //查询分类列表信息 郭瀚钰
    function getAllField() {
        $.ajax({
            type: 'post',
            url: '/Field/getAllField',
            dataType: 'json',
            success: function (msg) {
                app.fieldListresult = msg.fieldList
            }, error: function () {
                alert("分类列表失败")
            }
        })
    }

    //根据父类获取小类列表信息 郭瀚钰
    function getPointByField() {
        $.ajax({
            type: 'post',
            url: '/Point/getPointByField',
            dataType: 'json',
            data: {
                fieldId: $("#field").val()
            },
            success: function (msg) {
                app.pointListresult = msg.pointList
            }, error: function () {
                alert("子类分类列表失败")
            }
        })
    }

</script>